credit: Update other parameters when setting tslice_ms
authorNate Studer <nate.studer@dornerworks.com>
Fri, 15 Nov 2013 16:38:10 +0000 (17:38 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Nov 2013 16:38:10 +0000 (17:38 +0100)
commit1320b8100c2ed390fc640557a050f5c700d8338d
treec1467aa0b8828b2a0749a8da55234bfae0b8fdfc
parenta82e98d473fd212316ea5aa078a7588324b020e5
credit: Update other parameters when setting tslice_ms

Add a utility function to update the rest of the timeslice
accounting fields when updating the timeslice of the
credit scheduler, so that capped CPUs behave correctly.

Before this patch changing the timeslice to a value higher
than the default would result in a domain not utilizing
its full capacity and changing the timeslice to a value
lower than the default would result in a domain exceeding
its capacity.

Signed-off-by: Nate Studer <nate.studer@dornerworks.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/sched_credit.c